//
//  fxData.cpp
//  balance
//
//  Created by qi mao on 8/5/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//


#include "fxData.h"
#include <iostream>

double fxData::valueByName(string name){
    if (name=="open") {
        return this->open;
    } else {
        if (name=="high") {
            return this->high;
        } else {
            if (name=="low") {
                return this->low;
            } else {
                return this->close;
            }
        }
    }
}

void fxData::print(){
    cout<<this->day<<"\t"<<this->time<<"\t"<<this->open<<"\t"<<this->high<<"\t"<<this->low<<"\t"<<this->close<<"\t"<<this->volume<<endl;
}